package com.zhz.mall.common.util.inet;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;

import java.util.ArrayList;
import java.util.List;

/**
 * 网络配置
 * @author zhouhengzhe
 */
@Data
public class InetUtilsProperties {

    public static final String PREFIX = "spring.cloud.inetutils";

    private String defaultHostname = "localhost";

    private String defaultIpAddress = "127.0.0.1";

    @Value("${spring.util.timeout.sec:${SPRING_UTIL_TIMEOUT_SEC:1}}")
    private int timeoutSeconds = 1;

    private List<String> ignoredInterfaces = new ArrayList<>();

    private boolean useOnlySiteLocalInterfaces = false;

    private List<String> preferredNetworks = new ArrayList<>();

    public InetUtilsProperties() {
    }

    public static String getPREFIX() {
        return "spring.cloud.inetutils";
    }
}
